-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #4470, #4472, #4473 : Handle configuration change using onSavedInstance. #5478
Fix #4470, #4472, #4473 : Handle configuration change using onSavedInstance. #5478
Conversation
@adhiamboperes, could you please give this a green light for writing tests? Let me know if there are any concerns or suggestions for improvement. |
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 19 MiB (old), 19 MiB (new), 4584 bytes (Removed) APK download size (estimated): 17 MiB (old), 17 MiB (new), 2834 bytes (Removed) Method count: 259155 (old), 259252 (new), 97 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6806 (old), 6788 (new), 18 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 18 MiB (old), 18 MiB (new), 4420 bytes (Removed)
Configuration hdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration ldpiAPK file size: 49 KiB (old), 49 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 45 KiB (old), 45 KiB (new), 80 bytes (Removed) Configuration tvdpiAPK file size: 86 KiB (old), 86 KiB (new), 140 bytes (Removed) Configuration xhdpiAPK file size: 57 KiB (old), 57 KiB (new), 100 bytes (Removed) Configuration xxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 80 bytes (Removed) Configuration xxxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 80 bytes (Removed) AlphaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 43 KiB (Removed) APK download size (estimated): 10 MiB (old), 10 MiB (new), 39 KiB (Removed) Method count: 115689 (old), 115164 (new), 525 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5774 (old), 5758 (new), 16 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 10 MiB (new), 43 KiB (Removed)
Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 60 bytes (Removed) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 60 bytes (Removed) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 100 bytes (Removed) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) BetaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 43 KiB (Removed) APK download size (estimated): 10 MiB (old), 10 MiB (new), 34 KiB (Removed) Method count: 115695 (old), 115160 (new), 535 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5774 (old), 5758 (new), 16 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 10 MiB (old), 10 MiB (new), 43 KiB (Removed)
Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 60 bytes (Removed) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 60 bytes (Removed) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 100 bytes (Removed) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) GaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 44 KiB (Removed) APK download size (estimated): 10 MiB (old), 10 MiB (new), 33 KiB (Removed) Method count: 115695 (old), 115160 (new), 535 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5774 (old), 5758 (new), 16 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 10 MiB (old), 10 MiB (new), 43 KiB (Removed)
Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 60 bytes (Removed) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 60 bytes (Removed) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 100 bytes (Removed) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) |
@Vishwajith-Shettigar, I think it's good to go. We have already established the prefered solution, so feel free to complete the PR. |
@adhiamboperes, In image region selection interaction, when we select any default region in portrait mode and store coordinates in saved instances, and then rotate the device (landscape), we can't actually show the exact point of the default region selection mark, because the view size would be different in portrait and landscape mode, leading to the selection mark going anywhere. For more context i have attached screen recording. WhatsApp.Video.2024-08-12.at.4.32.38.PM.mp4A solution would be: |
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 19 MiB (old), 19 MiB (new), 4660 bytes (Removed) APK download size (estimated): 17 MiB (old), 17 MiB (new), 2621 bytes (Removed) Method count: 259155 (old), 259252 (new), 97 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6806 (old), 6788 (new), 18 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 18 MiB (old), 18 MiB (new), 4500 bytes (Removed)
Configuration hdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration ldpiAPK file size: 49 KiB (old), 49 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 45 KiB (old), 45 KiB (new), 80 bytes (Removed) Configuration tvdpiAPK file size: 86 KiB (old), 86 KiB (new), 140 bytes (Removed) Configuration xhdpiAPK file size: 57 KiB (old), 57 KiB (new), 100 bytes (Removed) Configuration xxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 80 bytes (Removed) Configuration xxxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 80 bytes (Removed) AlphaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 43 KiB (Removed) APK download size (estimated): 10 MiB (old), 10 MiB (new), 40 KiB (Removed) Method count: 115689 (old), 115164 (new), 525 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5774 (old), 5758 (new), 16 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 10 MiB (new), 43 KiB (Removed)
Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 60 bytes (Removed) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 60 bytes (Removed) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 100 bytes (Removed) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) BetaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 43 KiB (Removed) APK download size (estimated): 10 MiB (old), 10 MiB (new), 34 KiB (Removed) Method count: 115695 (old), 115160 (new), 535 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5774 (old), 5758 (new), 16 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 10 MiB (old), 10 MiB (new), 43 KiB (Removed)
Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 60 bytes (Removed) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 60 bytes (Removed) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 100 bytes (Removed) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) GaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 43 KiB (Removed) APK download size (estimated): 10 MiB (old), 10 MiB (new), 34 KiB (Removed) Method count: 115695 (old), 115160 (new), 535 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5774 (old), 5758 (new), 16 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 10 MiB (old), 10 MiB (new), 43 KiB (Removed)
Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 60 bytes (Removed) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 100 bytes (Removed) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 60 bytes (Removed) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 100 bytes (Removed) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 80 bytes (Removed) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 60 bytes (Removed) |
@Vishwajith-Shettigar, it sounds like a lot of engineering effort to map image selection cordinates on config change, that seems a bit out of scope for this issue. Besides, I tried testing with other popular apps(google apps, social media apps) to see how they handle such scenarios, and I found that they prefer to lock orientation as a workaround. So in our case, it is safe to not save the selection. |
Thanks @adhiamboperes. |
@adhiamboperes, PTAL. |
Coverage ReportResultsNumber of files assessed: 6 Exempted coverageFiles exempted from coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Vishwajith-Shettigar!
Coverage ReportResultsNumber of files assessed: 6 Exempted coverageFiles exempted from coverage
|
Explanation
Fixes #4470, Fixes #4472, Fixes #4473.
This PR enables the retention of input when the device configuration changes using onSavedInstance.
List of interactions covered in this PR:
| Drag and Drop |
draganddrop.mp4
| Image Region |
imageregion.mp4
Rest are covered in this PR #5458
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: